﻿@{
    Layout = null;
}

<form id="updateCheckedForm" method="post">
<table class="grid" width="100%" cellspacing="0" cellpadding="0">
	<!--基本信息-->
	<tbody>
    <tr>
		<td colspan="6" style="text-align: center; " bgcolor="#dfdfdf" align="center">客户信息</td>
	</tr>
	<tr>
		<td>企业名称</td>
		<td colspan="5">
		    <input type="text" id="TheName" name="TheName" class="easyui-textbox" style="width:300px;" data-options="required:true,readonly:true">
            <input type="hidden" id="ID" name="ID" value=""/>
		</td>
	<tr>
		<td colspan="6" style="text-align: center; " bgcolor="#dfdfdf" align="center">业务信息</td>
	</tr>
	<tr>
        <td>编号</td>
        <td>
		    <input type="text" id="BusinessCode" name="BusinessCode" class="easyui-textbox">
		</td>
		<td>项目名称</td>
		<td colspan="3">
            <input type="text" id="TypeName" name="TypeName" class="easyui-textbox">
            <input type="hidden" id="BusinessType" name="BusinessType" value="" />
		    <input id="BusinessType1" name="BusinessType1" class="easyui-combobox" data-options="    
				valueField: 'ID',    
				textField: 'TypeName',
				url: '@Url.Content("~/Main/GetParentType")', 
				onLoadSuccess: function(rec){
					if(rec){
						$(this).combobox('setValue',rec[0].ID);
					}
				},
				onSelect: function(n){
					var url = '@Url.Content("~/Main/GetChildType?id=")'+n.ID;
					$('#BusinessType2').combobox('clear');
					$('#BusinessType2').combobox('reload', url);
					$('#TypeName').textbox('setValue',n.TypeName);
                    $('#BusinessType').val(n.ID);
				}" />   
			<input id="BusinessType2" name="BusinessType2" class="easyui-combobox" data-options="
				valueField:'ID',
				textField:'TypeName',
				onLoadSuccess: function(rec){
					if(rec.length>0){
						$(this).combobox('setValue',rec[0].ID);
						$('#TypeName').textbox('setValue',rec[0].TypeName);
					}
				},
				onSelect: function(rec){
					$('#TypeName').textbox('setValue',rec.TypeName);
                    $('#BusinessType').val(rec.ID);
				}"/>
		</td>
    <tr>
        <td>合同开始日期</td>
        <td>
           @* <input id="BeginDate" name="BeginDate" type="text" class="easyui-datebox"></input>*@
             <input id="BeginDate" name="BeginDate" class="easyui-textbox" /> 
        </td>
        <td>合同终止日期</td>
        <td>
            @*<input id="EndDate" name="EndDate" type="text" class="easyui-datebox"></input>*@
             <input id="EndDate" name="EndDate" class="easyui-textbox" /> 
        </td>
        <td>是否新签</td>
        <td>
            <select id="Contract" class="easyui-combobox" name="Contract">
                <option value="0">----</option> 
                <option value="1">新签</option>
                <option value="2">续签</option>
            </select>
        </td>
    </tr>
	<tr>
		<td>合同金额</td>
		<td>
		    <input type="text" id="Charges" name="Charges"  class="easyui-numberbox" data-options="required:true,min:0,precision:2">
		</td>
	    <td>客户介绍人</td>
		<td>
		    <input type="text" name="Introducer" id="Introducer" class="easyui-textbox">
		</td>
		<td>经办人</td>
		<td>
		    <input type="text" name="Agent" id="Agent" class="easyui-textbox" data-options="required:true">
		</td>
	</tr>
    <tr>
	    <td>所属部（室）</td>
		<td>
		    <input id="TheOffice" name="TheOffice" class="easyui-combobox" data-options="    
				valueField: 'ID',    
				textField: 'Name',
				url: '@Url.Content("~/Main/GetOffice")'" />   
		</td>
		<td>所属分局</td>
		<td>
		    <input id="TheDepartment" name="TheDepartment" class="easyui-combobox" data-options="    
				valueField: 'ID',    
				textField: 'Name',
				url: '@Url.Content("~/Main/GetDepartments")'" />   
		</td>
		<td>类型</td>
		<td><input id="Payment" name="Payment" class="easyui-combobox" data-options="    
				valueField: 'ID',    
				textField: 'Payment',
				url: '@Url.Content("~/Main/GetPayment")'" />
        </td>
	</tr>
	<tr>
	  <td>备注</td>
	  <td colspan="5"><input type="text" name="Items" id="Items" class="easyui-textbox" data-options="multiline:true" style="height:80px;width:600px"></td>
	</tr>
    @if (Session["AuthID"].ToString() == "2")
    {
     <tr>
		<td colspan="6" style="text-align: center; " bgcolor="#dfdfdf" align="center">审核<input id="updateBill" name="updateBill" value="1" type="hidden" /></td>
	</tr>
    <tr>
      <td>开票日期</td>
      <td>
         @* <input id="BillDate" name="BillDate" type="text" class="easyui-datebox"></input>*@
          <input id="BillDate" name="BillDate" class="easyui-textbox" /> 
      </td>
      <td>开票金额</td>
      <td><input type="text" id="BillMoney" name="BillMoney"  class="easyui-numberbox" data-options="min:0,precision:2,groupSeparator:',',prefix:'￥'"></td>
      <td>开票单位</td>
      <td>
          <input id="BillDepartment" name="BillDepartment" class="easyui-combobox" data-options="    
				valueField: 'ID',    
				textField: 'Name',
				url: '@Url.Content("~/Main/GetBillUnit")'" />
      </td>
    </tr>
    }
</tbody>
</table>
</form>
